import request from '@/utils/request.js'
const state = {
  indexData:{},
	indexwtfData:[]
}

const mutations = {
  SET_INDEXDATA(state,indexData){
    state.indexData = indexData
  }
	,
	SET_INDEXWTFDATA(state,indexwtfData){
	  state.indexwtfData = indexwtfData
	}
}

const actions = {
  async getIndexData({commit}){
    const result = await request('/getIndexData')
		// console.log(result)
    commit('SET_INDEXDATA',result.data)
  }
	,
	async getindexwarterFull({commit}){
	  const result = await request('/indexwarterFull')
		console.log(result)
	  commit('SET_INDEXWTFDATA',result.data.skuInfo)
	}
}
const getters = {}


export default {
  namespaced:true,
  state,
  mutations,
  actions,
  getters
}